<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="os-miscfunc.html" />
<link rel="prev" href="os-process.html" />
<link rel="parent" href="module-os.html" />
<link rel="next" href="os-miscfunc.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>14.1.6 Miscellaneous System Information </title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="14.1.5 process Management"
  href="os-process.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="14.1 os  "
  href="module-os.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="14.1.7 miscellaneous Functions"
  href="os-miscfunc.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="os-process.html">14.1.5 Process Management</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-os.html">14.1 os  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="os-miscfunc.html">14.1.7 Miscellaneous Functions</a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h2><a name="SECTION0016160000000000000000"></a><a name="os-path"></a>
<br>
14.1.6 Miscellaneous System Information 
</h2>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-2798' xml:id='l2h-2798' class="function">confstr</tt></b>(</nobr></td>
  <td><var>name</var>)</td></tr></table></dt>
<dd>
Return string-valued system configuration values.
<var>name</var> specifies the configuration value to retrieve; it may be a
string which is the name of a defined system value; these names are
specified in a number of standards (POSIX, <span class="Unix">Unix</span> 95, <span class="Unix">Unix</span> 98, and
others).  Some platforms define additional names as well.  The names
known to the host operating system are given as the keys of the
<code>confstr_names</code> dictionary.  For configuration variables not
included in that mapping, passing an integer for <var>name</var> is also
accepted.
Availability: Macintosh, <span class="Unix">Unix</span>.

<p>
If the configuration value specified by <var>name</var> isn't defined,
<code>None</code> is returned.

<p>
If <var>name</var> is a string and is not known, <tt class="exception">ValueError</tt> is
raised.  If a specific value for <var>name</var> is not supported by the
host system, even if it is included in <code>confstr_names</code>, an
<tt class="exception">OSError</tt> is raised with <tt class="constant">errno.EINVAL</tt> for the
error number.
</dl>

<p>
<dl><dt><b><tt id='l2h-2799' xml:id='l2h-2799'>confstr_names</tt></b></dt>
<dd>
Dictionary mapping names accepted by <tt class="function">confstr()</tt> to the
integer values defined for those names by the host operating system.
This can be used to determine the set of names known to the system.
Availability: Macintosh, <span class="Unix">Unix</span>.
</dd></dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-2800' xml:id='l2h-2800' class="function">getloadavg</tt></b>(</nobr></td>
  <td><var></var>)</td></tr></table></dt>
<dd>
Return the number of processes in the system run queue averaged over
the last 1, 5, and 15 minutes or raises <tt class="exception">OSError</tt> if the load 
average was unobtainable.

<p>

<span class="versionnote">New in version 2.3.</span>

</dl>

<p>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
  <td><nobr><b><tt id='l2h-2801' xml:id='l2h-2801' class="function">sysconf</tt></b>(</nobr></td>
  <td><var>name</var>)</td></tr></table></dt>
<dd>
Return integer-valued system configuration values.
If the configuration value specified by <var>name</var> isn't defined,
<code>-1</code> is returned.  The comments regarding the <var>name</var>
parameter for <tt class="function">confstr()</tt> apply here as well; the dictionary
that provides information on the known names is given by
<code>sysconf_names</code>.
Availability: Macintosh, <span class="Unix">Unix</span>.
</dl>

<p>
<dl><dt><b><tt id='l2h-2802' xml:id='l2h-2802'>sysconf_names</tt></b></dt>
<dd>
Dictionary mapping names accepted by <tt class="function">sysconf()</tt> to the
integer values defined for those names by the host operating system.
This can be used to determine the set of names known to the system.
Availability: Macintosh, <span class="Unix">Unix</span>.
</dd></dl>

<p>
The follow data values are used to support path manipulation
operations.  These are defined for all platforms.

<p>
Higher-level operations on pathnames are defined in the
<tt class="module"><a href="module-os.path.html">os.path</a></tt> module.

<p>
<dl><dt><b><tt id='l2h-2803' xml:id='l2h-2803'>curdir</tt></b></dt>
<dd>
The constant string used by the operating system to refer to the current
directory.
For example: <code>'.'</code> for POSIX or <code>':'</code> for Mac OS 9.
Also available via <tt class="module">os.path</tt>.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2804' xml:id='l2h-2804'>pardir</tt></b></dt>
<dd>
The constant string used by the operating system to refer to the parent
directory.
For example: <code>'..'</code> for POSIX or <code>'::'</code> for Mac OS 9.
Also available via <tt class="module">os.path</tt>.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2805' xml:id='l2h-2805'>sep</tt></b></dt>
<dd>
The character used by the operating system to separate pathname components,
for example, "<tt class="character">/</tt>" for POSIX or "<tt class="character">:</tt>" for
Mac OS 9.  Note that knowing this is not sufficient to be able to
parse or concatenate pathnames -- use <tt class="function">os.path.split()</tt> and
<tt class="function">os.path.join()</tt> -- but it is occasionally useful.
Also available via <tt class="module">os.path</tt>.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2806' xml:id='l2h-2806'>altsep</tt></b></dt>
<dd>
An alternative character used by the operating system to separate pathname
components, or <code>None</code> if only one separator character exists.  This is
set to "<tt class="character">/</tt>" on Windows systems where <code>sep</code> is a
backslash.
Also available via <tt class="module">os.path</tt>.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2807' xml:id='l2h-2807'>extsep</tt></b></dt>
<dd>
The character which separates the base filename from the extension;
for example, the "<tt class="character">.</tt>" in <span class="file">os.py</span>.
Also available via <tt class="module">os.path</tt>.

<span class="versionnote">New in version 2.2.</span>

</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2808' xml:id='l2h-2808'>pathsep</tt></b></dt>
<dd>
The character conventionally used by the operating system to separate
search path components (as in <a class="envvar" id='l2h-2812' xml:id='l2h-2812'>PATH</a>), such as "<tt class="character">:</tt>" for
POSIX or "<tt class="character">;</tt>" for Windows.
Also available via <tt class="module">os.path</tt>.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2809' xml:id='l2h-2809'>defpath</tt></b></dt>
<dd>
The default search path used by <tt class="function">exec*p*()</tt> and
<tt class="function">spawn*p*()</tt> if the environment doesn't have a <code>'PATH'</code>
key.
Also available via <tt class="module">os.path</tt>.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2810' xml:id='l2h-2810'>linesep</tt></b></dt>
<dd>
The string used to separate (or, rather, terminate) lines on the
current platform.  This may be a single character, such as <code>'\
n'</code> for POSIX or <code>'\r'</code> for Mac OS, or multiple characters,
for example, <code>'\r\n'</code> for Windows.
</dd></dl>

<p>
<dl><dt><b><tt id='l2h-2811' xml:id='l2h-2811'>devnull</tt></b></dt>
<dd>
The file path of the null device.
For example: <code>'/dev/null'</code> for POSIX or <code>'Dev:Nul'</code> for
Mac OS 9.
Also available via <tt class="module">os.path</tt>.

<span class="versionnote">New in version 2.4.</span>

</dd></dl>

<p>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="14.1.5 process Management"
  href="os-process.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="14.1 os  "
  href="module-os.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="14.1.7 miscellaneous Functions"
  href="os-miscfunc.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="os-process.html">14.1.5 Process Management</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-os.html">14.1 os  </a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="os-miscfunc.html">14.1.7 Miscellaneous Functions</a>
</div>
</div>
<hr />
<span class="release-info">Release 2.5.1, documentation updated on 18th April, 2007.</span>
</div>
<!--End of Navigation Panel-->
<address>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</address>
</body>
</html>
